-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add terraform for capz monitoring cluster #7776
base: main
Are you sure you want to change the base?
Conversation
792ffdb
to
21e8cfe
Compare
/hold for reviews My first go with terraform stuff. I just modeled the file off of my existing capz-monitoring cluster. Is it okay to hard-code the name and location since I don't think it's currently set to the default? If not, I can re-create the cluster in the correct location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Is it okay to hard-code the name and location
I'm not sure actually, I followed the var.location
convention when I made changes, but I'm not a terraform expert. I doubt it's a problem in practice to use eastus
, but maybe @jsturtevant knows?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mboersma, willie-yao The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
New changes are detected. LGTM label has been removed. |
} | ||
} | ||
|
||
resource "azurerm_resource_group" "MC_capz-monitoring_capz-monitoring_eastus" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am surprised that this resource group needs to be captured in the terraform. This is a RG that is managed by AKS and shouldn't be managed by terraform AFAIK.
Says confirms that for me, in that we could provide a name but otherwise don't need to specify it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that makes sense. I included it because I noticed that this resource group has been getting deleted on the CNCF sub periodically while I'm testing even though I have the do not delete tag set on it. Does this need to be in terraform if I don't want it to be deleted, or is that being caused by something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that if you put the tags do-not-delete on the AKS resource group and AKS cluster, it will carry those through when it creates managed RG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm okay, next time it gets deleted I might need some help figuring out what is causing it. Thanks!
I think you've done the right thing with the location/name. Those are variables, you can specify them with variables to use them with pre-created clusters. The part you don't need is the |
Adds terraform needed to recreate the capz monitoring cluster used to monitor/export metrics from CAPZ e2e tests.